

import VersionManager from "../../engine/VersionManager";
import ViewBase from "../../engine/ViewBase";
import { NativeSdkHelper } from "../../sdk/NativeSdkHelper";
import { UIHelper } from "../util/UIHelper";

const { ccclass, property } = cc._decorator;

@ccclass
export default class ViewCustomer extends ViewBase {

    private wechatHao: string = "gzmthwj"
    private qq: string = "3638801"

    public onInitChild(...optionalParams: any[]): void {

        let lbWechat: cc.Label = this.getChild(this.node, "lbWechat", cc.Label)
        lbWechat.string = this.wechatHao
        let btnCopyWechat: cc.Node = this.findChild(this.node, "btnCopyWechat")
        UIHelper.onAddEvent(btnCopyWechat, () => {
            NativeSdkHelper.copyToClipBoard(lbWechat.string)
        })
        let lbQQ: cc.Label = this.getChild(this.node, "lbQQ", cc.Label)
        lbQQ.string = this.qq + ""

        let btnCopyQQ: cc.Node = this.findChild(this.node, "btnCopyQQ")
        UIHelper.onAddEvent(btnCopyQQ, () => {
            NativeSdkHelper.copyToClipBoard(lbQQ.string)
        })

    }



}
